{extend name='index/index' /}

{block name='main'}
<style>

    #vip + div .am-selected-list li{
        display: none;
    }
    #vip + div .am-selected-list li:first-child{
        display: block;
    }
</style>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<div id="tpl-echarts"></div>
<div class="tpl-content-wrapper">


    <div class="row-content am-cf">

        <div class="row">

            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                <div class="widget am-cf">
                    <div class="widget-head am-cf">
                        <div class="widget-title am-fl">出入金统计</div>
                        <div class="widget-function am-fr">
                            <a href="javascript:;" class="am-icon-cog"></a>
                        </div>
                    </div>
                    <form id="myform" class="am-form tpl-form-border-form tpl-form-border-br" style="line-height: 40px" action="">
                        <span style="text-align:right;display: inline-block;width: 50px;margin-left: 4px">名字：</span><input id="aaa" style="width: 200px;display: inline-block" name="name" value="{$get.name}" type="text">
                        <span style="text-align:right;display: inline-block;width: 100px;margin-left: 4px">开始日期：</span><input id="start" style="width: 200px;display: inline-block" name="start" value="{$get.start}" type="date">
                        <span style="text-align:right;display: inline-block;width: 100px;margin-left: 4px">结束日期：</span><input id="end" style="width: 200px;display: inline-block" name="end" value="{$get.end}" type="date">

                        <button class="am-btn am-btn-primary tpl-btn-bg-color-success ">查找</button>
                        <!--<button type="button" id="export" onclick="ex()" class="am-btn am-btn-primary tpl-btn-bg-color-success ">导出</button>-->
                    </form>


                    <div class="widget-body  widget-body-lg am-fr">

                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " id="">
                            <thead>
                            <tr>
                                <th>Id</th>
                                <th>名字</th>
                                <th>入金金额</th>
                                <th>出金金额</th>
                                <th>时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name='list' id='user'}

                            <tr class="even gradeC">
                                <td>{$user.id}</td>
                                <td>
                                    <a class="myname">{$user.name}</a></td>
                                <td>{if condition="$user.type == 5"}{$user.price}
                                    {else /}
                                    {/if}</td>
                                <td>{if condition="$user.type == 5"}
                                    {else /} {$user.price}
                                    {/if}</td>
                                <td>{$user.time}</td>
                            </tr>
                            {/volist}
                            <tr class="even gradeC" style="color: red">
                                <td>总计</td>
                                <td>-</td>
                                <td>{$tj.rj}</td>
                                <td>{$tj.cj}</td>
                                <td>-</td>
                            </tr>
                            <!-- more data -->
                            </tbody>
                        </table>

                        {$page}
                    </div>
                </div>
            </div>

            <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" style="margin-top: 15%;" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="name">详情：</h4>
                        </div>
                        <div class="modal-body" style="line-height: 30px;">
                            子账号：<a id="zzh">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            所属分组：<a id="ssfz">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            交易日：<a id="jyr">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            委托号：<a id="wth">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            成交号：<a id="cjh">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            请求号：<a id="qqh">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            交易所：<a id="jys">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            合约：<a id="hy">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            买卖：<a id="mm">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            开平：<a id="kp">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            投保：<a id="tb">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            成交价：<a id="cjj">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            成交量：<a id="cjl">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            成交金额：<a id="cjje">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            实际日期：<a id="sjrq">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            成交时间：<a id="cjsj">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            主账号：<a id="zhu">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            系统号：<a id="xth">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            手续费：<a id="sxf">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            平仓浮动盈亏：<a id="pcfdyk">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            平仓盈亏：<a id="pcyk">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <br>
                            基础手续费：<a id="jcsxf">11</a>&nbsp;&nbsp;&nbsp;&nbsp;
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        </div>
                    </div>
                </div>
            </div>




        </div>

    </div>
</div>
<script>
    function ex(){
        var $start=$('#start').val();
        var $end=$('#end').val();
//        var tempwindow=window.open();
//        tempwindow.location='{:url("admin_platform/Transaction/export")}'+'?start='+$start+'&end='+$end;
        window.location.href='{:url("admin_platform/Transaction/cjexport")}'+'?start='+$start+'&end='+$end;
        return false;
    }

    $('.myname').click(function () {
        var name=$(this).html();
        $('#aaa').val(name);
        $('#myform').submit();
    })

</script>
{/block}

